package org.tom.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.tom.basic.domain.BaseDomain;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class OrderPet extends BaseDomain {
    // 订单待支付
    public static final int WAIT_PAY_ORDER = 0;
    // 订单支付成功待发货
    public static final int SUCCESS_PAY_ORDER = 1;
    // 用户取消订单
    public static final int CANCEL_PAY_ORDER = -1;
    // 支付失败
    public static final int FAIL_PAY_ORDER = -2;
    // 超时取消订单
    public static final int FAIL_PAY_BYTIME_ORDER = -3;
    // 订单已经发货
    public static final int SUCCESS_DELIVER_ORDER = 2;
    // 确认订单，流程结束
    public static final int AFFIRM_ORDER = 3;


    // 订单的备注
    private String digest;
    // 订单的状态
    private Integer state = WAIT_PAY_ORDER;
    // 订单的总金额
    private BigDecimal totalPrice;
    // 订单的总数量
    private Integer totalCount;
    // 订单的编号
    private String orderSn;
    // 订单最后的修改时间

    private Date lastUpdateTime;
    // 订单最后的失效时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date payExpireTime;
    // 下单用户的id
    private Long userId;
    // 订单创建的时间
    private Date createTime;
    // 支付的方式
    private Integer payType;

}
